﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using RockCompany.Common.Lib;
using RockCompany.Common.Constant;
using RockCompany.Master.View;
using RockCompany.Common.Forms;

namespace RockCompany.Master.View
{
    public partial class SC04 : ParentFrm
    {
        private Translator trans;
        private UserAuthenticate uAuth;
        private string sUserName;

        public SC04()
        {
            InitializeComponent();
        }

        public SC04(Translator trans, string sUserName, Form caller)
            : base(sUserName, caller)
        {
            this.trans = trans;
            uAuth = new UserAuthenticate();

            InitializeComponent();
            uAuth.setRights(this, sUserName);
            trans.controlTranslate(this);

            this.sUserName = sUserName;
        }

        private void button_PhieuXH_Click(object sender, EventArgs e)
        {
            this.Hide();
            SI05A frm_SI05A = new SI05A(trans, sUserName, this);
            frm_SI05A.initDefaultData();
            frm_SI05A.Show();
        }

        private void button_PHieuXKTP_Click(object sender, EventArgs e)
        {
            this.Hide();
            SI06A frm_SI06A = new SI06A(trans, sUserName, this);
            frm_SI06A.initDefaultData();
            frm_SI06A.Show();
        }

        private void button_TimKiemPhieXKTP_Click(object sender, EventArgs e)
        {
            this.Hide();
            SI06B frm_SI06B = new SI06B(trans, sUserName, this);
            frm_SI06B.Show();
        }

        private void button_TimKiemPhieuXH_Click(object sender, EventArgs e)
        {
            this.Hide();
            SI05B frm_SI05B = new SI05B(trans, sUserName, this);
            frm_SI05B.Show();
        }
    }
}
